<!--#include file="conn.asp"-->
<!--#include file="chkuser.asp"-->
<%
call adminRight(4)

id=request("id")

if request("action")="edit" then
	Duix=Replace_Text(request("Duix"))
	Rens=Replace_Text(request("Rens"))
	Did=Replace_Text(request("Did"))
	Daiy=Replace_Text(request("Daiy"))
	AddDate=Replace_Text(Request("AddDate"))
	Yaoq=Replace_Text(request("Yaoq"))
	Qix=Replace_Text(request("Qix"))
	
	sql="select * from job where ID="+ID
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,2,3
	rs("Duix")=Duix
	rs("Rens")=Rens
	rs("Did")=Did
	rs("Daiy")=Daiy
	rs("AddDate")=AddDate
	rs("Yaoq")=Yaoq
	rs("Qix")=Qix
	rs.update
	rs.close
	Set rs=nothing
	alert("修改成功！")
	Go("Admin_Manpower.asp?showMsgStr=<br><b>招聘信息已修改成功！</b>|parent|3000|500||")
end if
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>编辑招聘</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="./../kindeditor/kindeditor.js"></script>
</head>
<body>
<%
   Set rs = Server.CreateObject("ADODB.Recordset")
   sql="select * from job where id="&id
   rs.open sql,conn,1,1
   Yaoq=rs("Yaoq") 
%>
   <form method="post" action="?action=edit&ID=<%=ID%>" onSubmit="return Juge(this)">
    <div id="frame_Toolbar" class="toolbarBg"> 
		<a href="javascript:self.history.back();" class="icoBtn_ct"><span class="btnIco btnBack"></span>返回</a> 
		<a href="javascript:self.location.reload();" class="icoBtn_ct"><span class="btnIco btnReload"></span>刷新</a> 
		<span class="split ftSplit" ></span>
	<div id="guide" class="light_orange">请填写动态信息！</div>
	<div class="pageInfo right light_gray"></div>
    </div>
    <table class="cTable_2 table">
	<tr class="cTitle toolbarBg">
		<td width="25%"><div class="cLeftPadding">编辑招聘</div></td>
		<td></td>
	</tr>
	<tr>
		<td class="tRight">职位名称：</td>
		<td><input name="Duix" type="text" id="Duix" style="width:250px;" maxlength="255" value="<%=rs("Duix")%>" />
	    <span id="RequiredFieldValidator1" style="color:Red;">*</span></td>
	</tr>
	<tr>
	  <td valign="top" class="tRight">招聘人数：</td>
	  <td><input name="Rens" type="text" style="width:250px;" maxlength="255" id="Rens" value="<%=rs("Rens")%>" >
      <span style="color:Red;">*</span></td>
	  </tr>
	<tr>
	  <td valign="top" class="tRight">工作地点：</td>
	  <td><input name="Did" type="text" style="width:250px;" id="Did" value="<%=rs("Did")%>" size="30" maxlength="255">
      <span style="color:Red;">*</span></td>
	  </tr>
	<tr>
	  <td valign="top" class="tRight">工资待遇：</td>
	  <td><input name="Daiy" type="text" style="width:250px;" maxlength="255" id="Daiy" value="<%=rs("Daiy")%>" >
      <span style="color:Red;">*</span></td>
	  </tr>
	<tr>
	  <td valign="top" class="tRight">发布时间：</td>
	  <td><input name="AddDate" type="text"  id="AddDate" value="<%=rs("AddDate")%>" size="20">
	  <span style="color:Red;">*</span></td>
	  </tr>
	<tr>
	  <td valign="top" class="tRight">有效期限：</td>
	  <td><input name="Qix" type="text"  id="Qix" value="<%=rs("Qix")%>" size="10" maxlength="255">
      天<span style="color:Red;">*</span></td>
	  </tr>
	<tr>
	  <td valign="top" class="tRight">职位描述及要求：</td>
	  <td>
		<script type="text/javascript">
		KE.show({
			id : 'Yaoq',
			resizeMode : 1,
			items : [
			'source', 'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
			'removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
			'insertunorderedlist', 'link', 'unlink', 'emoticons'],
			afterCreate : function(id) {
				KE.blur(id);
			}
		});
	    </script>
		<div class="editor">
		<textarea id="Yaoq" name="Yaoq" style="width:450px;height:160px;visibility:hidden;"><%=Yaoq%></textarea>
		</div>
      <span style="color:Red;">*</span></td>
	  </tr>
    </table>
	<%
	   rs.close
	   set rs=nothing
	%>
    <div id="cEndToolbar" class="toolbarBg">
      <div class="caButCase">
		    <input type="submit" name="Submit" value="确认添加" class="button">
	        <input type="reset" name="Submit2" value="清空重填" class="button">
      </div>
    </div>
  </form>
</body>
</html>
<script language="javascript">
function Juge(theform){
	if(theform.Duix.value==""){
		alert("请输入职位名称");
		theform.Duix.focus();
		return false;
	}
	if(theform.Rens.value==""){
		alert("请输入招聘人数");
		theform.Rens.focus();
		return false;
	}
	if(theform.Did.value==""){
		alert("请输入工作地点");
		theform.Did.focus();
		return false;
	}
	if(theform.Duix.value==""){
		alert("请输入职位名称");
		theform.Duix.focus();
		return false;
	}
	if(theform.Daiy.value==""){
		alert("请输入工资待遇");
		theform.Daiy.focus();
		return false;
	}
	if(theform.AddDate.value==""){
		alert("请输入发布时间");
		theform.AddDate.focus();
		return false;
	}
	if(theform.Qix.value==""){
		alert("请输入有效期");
		theform.Qix.focus();
		return false;
	}
}
</script>